package com.maxmlr.base.jvm;

/**
 *
 *   javap -v 查看源码
 * @ClassName Test2
 * @Description TODO
 * @Author maxiao
 * @Date 2020/3/25 下午11:39
 * @Version V1.0
 */
public class Test2 {
    public static void main(String[] args) {
        Uesr uesr = new Uesr();
        uesr.id=11;
        uesr.name="ll";
        int test = test(uesr);
        System.out.println(test);

       /*
        descriptor: ([Ljava/lang/String;)V
        flags: ACC_PUBLIC, ACC_STATIC
        Code:
        stack=2, locals=3, args_size=1
        0: new           #2                  // class com/maxmlr/base/jvm/Uesr
        3: dup
        4: invokespecial #3                  // Method com/maxmlr/base/jvm/Uesr."<init>":()V
        7: astore_1
        8: aload_1
        9: bipush        11
        11: invokevirtual #4                  // Method com/maxmlr/base/jvm/Uesr.setId:(I)V
        14: aload_1
        15: ldc           #5                  // String ll
        17: putfield      #6                  // Field com/maxmlr/base/jvm/Uesr.name:Ljava/lang/String;
        20: aload_1
        21: invokestatic  #7                  // Method test:(Lcom/maxmlr/base/jvm/Uesr;)I
        24: istore_2
        25: getstatic     #8                  // Field java/lang/System.out:Ljava/io/PrintStream;
        28: iload_2
        29: invokevirtual #9                  // Method java/io/PrintStream.println:(I)V
        32: return
                LineNumberTable:
        line 12: 0
        line 13: 8
        line 14: 14
        line 15: 20
        line 16: 25
        line 17: 32
        LocalVariableTable:
        Start Length  Slot  Name   Signature
        0      33     0  args   [Ljava/lang/String;
        8      25     1  uesr   Lcom/maxmlr/base/jvm/Uesr;
        25       8     2  test   I
        */

    }

    public static int test(Uesr uesr){
        return uesr.id;
    }


}
